
    <div class="layui-card-header">业务概况</div>
    <div class="layui-card-body">
        <div class="layui-carousel ">
            <ul class="layui-row" style="background: white">
                <li class="layui-col-xs3" style="border:solid 1px;padding:15px 0 0 30px;height: 150px;" >
                    <div>总收入(元)</div>
                    <div style="margin-top: 20px;font-size:50px"><span id="orderMoney"></span></div>
                    <div style="margin-top: 20px;">
                        <div style="float:left">今日：<span id="tdayOrderMoney"></span></div>
                        <div style="float:left;margin-left: 80px">昨日：<span  id="ydayOrderMoney"></span></div>
                    </div>
                </li>
                <li class="layui-col-xs3" style="border:solid 1px;padding:15px 0 0 30px;margin-left:30px;height: 150px;" >
                    <div>订单总数</div>
                    <div style="margin-top: 20px;font-size:50px;" ><span id="orderCount"></span></div>
                    <div style="margin-top: 20px;">
                        <div style="float:left">今日：<span id="tdayOrderCount"></span></div>
                        <div style="float:left;margin-left: 80px">昨日：<span id="ydayOrderCount"></span></div>
                    </div>
                </li>
                <li class="layui-col-xs3" style="border:solid 1px;padding:15px 0 0 30px;margin-left:30px;height: 150px;" >
                    <div>总用户数</div>
                    <div style="margin-top: 20px;font-size:50px;"><span id="custCount"></span></div>
                    <div style="margin-top: 20px;">
                        <div style="float:left">今日新增：<span id="tdayCustCount"></span></div>
                        <div style="float:left;margin-left: 80px">昨日新增：<span id="ydayCustCount"></span></div>
                    </div>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-card-header">待办事项</div>
    <div class="layui-card-body">
        <div class="layui-carousel ">
            <ul class="layui-row" style="background: white">
                <li class="layui-col-xs3" style="border:solid 1px white;padding:15px 0 0 30px;background:#F8F8F8;height: 150px;" >
                    <div>申请退款订单</div>
                    <div style="margin-top: 30px;margin-left:20px;"><span id="refundCount" style="font-size:30px;margin-right: 20px;font-weight:bold;"></span>单待处理</div>
                </li>
<!--                <li class="layui-col-xs3" style="border:solid 1px white;padding:15px 0 0 30px;margin-left:30px;background:#F8F8F8;height: 150px;" >-->
<!--                    <div>退款失败订单</div>-->
<!--                    <div style="margin-top: 30px;margin-left:20px;" ><span id="failCount" style="font-size:30px;margin-right: 20px;font-weight:bold;"></span>单已处理</div>-->
<!--                </li>-->
<!--                <li class="layui-col-xs3" style="border:solid 1px white;padding:15px 0 0 30px;margin-left:30px;background:#F8F8F8;height: 150px;" >-->
<!--                    <div>客户服务</div>-->
<!--                    <div style="margin-top: 30px;margin-left:20px;"><span id="crmCount" style="font-size:30px;margin-right: 20px;font-weight:bold;"></span>人排队中</div>-->
<!--                </li>-->
                <li class="layui-col-xs3" style="border:solid 1px white;padding:15px 0 0 30px;margin-left:30px;background:#F8F8F8;height: 150px;" >
                    <div>意见反馈</div>
                    <div style="margin-top: 30px;margin-left:20px;"><span id="unHandSuggest" style="font-size:30px;margin-right: 20px;font-weight:bold;"></span>条待处理</div>
                </li>
            </ul>
        </div>
    </div>

    <div class="layui-card-header">已办事项</div>
    <div class="layui-card-body">
        <div class="layui-carousel ">
            <ul class="layui-row" style="background: white">
                <li class="layui-col-xs3" style="border:solid 1px white;padding:15px 0 0 30px;background:#F8F8F8;height: 150px;" >
                    <div>确认退款订单</div>
                    <div style="margin-top: 30px;" ><span id="eolRefundCount" style="font-size:30px;margin-right: 20px;font-weight:bold;"></span>单已处理</div>
                    <div style="margin-top: 20px;">
                        <div style="float:left">今日处理：<span id="tdayEolRefundCount"></span></div>
                        <div style="float:left;margin-left: 50px">昨日处理：<span id="ydayEolRefundCount"></span></div>
                    </div>
                </li>

                <li class="layui-col-xs3" style="border:solid 1px white;padding:15px 0 0 30px;background:#F8F8F8;height: 150px;margin-left:30px;" >
                    <div>意见反馈处理</div>
                    <div style="margin-top: 30px;" ><span id="handSuggest" style="font-size:30px;margin-right: 20px;font-weight:bold;"></span>条已处理</div>
                    <div style="margin-top: 20px;">
                        <div style="float:left">今日处理：<span id="tdaySuggest"></span></div>
                        <div style="float:left;margin-left: 50px">昨日处理：<span id="ydaySuggest"></span></div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
<script>
    layui.use(['layer'],function(){
        var $ = layui.jquery;
        getData();

        function getData(){
            $.ajax({
                type: 'POST',
                url: '${ctxPath}/console/getData.json',
                data: {},
                async: false,
                dataType:'json',
                success: function(res){
                    $("#orderMoney").html(Math.floor(res.data.orderMoney/100));
                    $("#tdayOrderMoney").html(Math.floor(res.data.tdayOrderMoney/100));
                    $("#ydayOrderMoney").html(Math.floor(res.data.ydayOrderMoney/100));
                    $("#orderCount").html(res.data.orderCount);
                    $("#tdayOrderCount").html(res.data.tdayOrderCount);
                    $("#ydayOrderCount").html(res.data.ydayOrderCount);
                    $("#custCount").html(res.data.custCount);
                    $("#tdayCustCount").html(res.data.tdayCustCount);
                    $("#ydayCustCount").html(res.data.ydayCustCount);
                    $("#refundCount").html(res.data.refundCount);
                    $("#eolRefundCount").html(res.data.eolRefundCount);
                    $("#tdayEolRefundCount").html(res.data.tdayEolRefundCount);
                    $("#ydayEolRefundCount").html(res.data.ydayEolRefundCount);
                    $("#unHandSuggest").html(res.data.unHandSuggest);
                    $("#handSuggest").html(res.data.handSuggest);
                    $("#tdaySuggest").html(res.data.tdaySuggest);
                    $("#ydaySuggest").html(res.data.ydaySuggest);
                }
            });
            // $.ajax({
            //     type: 'POST',
            //     url: '${ctxPath}/crm/chat/getWaitQueueSize.json',
            //     data: {},
            //     async: false,
            //     dataType:'json',
            //     success: function(res){
            //         if(res.code==0){
            //             $("#crmCount").html(res.data);
            //         }else{
            //             $("#crmCount").html(0);
            //         }
            //     }
            // });

        }
        //循环定时器：
        var timename=setInterval(getData,60*1000);

        //去掉定时器的方法
        // window.clearInterval(timename);
    });
</script>
